//using System;
//using System.Collections.Generic;
//using System.Data;
//using Sok.Munkae.Core;
//using Sok.Munkae.Core.DataInterfaces;

//namespace Sok.Munkae.Data
//{
//    public class TenantRepository : IRepository<Organization>
//    {
//        private IDao<Organization> dao;
//        public TenantRepository(IDao<Organization> dao)
//        {
//            this.dao = dao;
//        }

        
//        public Organization Get(int organizationId)
//        {
//            return
//                dao.GetOne(
//                    "select Id,[Name],ShortName FROM Organization WHERE Id = @Id",
//                    new Dictionary<string, object>() {{"@Id", organizationId}},
//                    BuildOne);
//        }

//        public IList<Organization> GetAll()
//        {
//            throw new NotImplementedException();
//        }


//        //DEMO CODE QUALITY ALERT! Having this method in each repository is probably to repetitive, 
//        // consider refactoring (DRY = "Don't Repeat Yourself")
//        protected Organization BuildOne(IDataReader reader)
//        {
//            Organization org = new Organization();
//            if (reader.Read())
//            {
//                org.Id = (int) reader["Id"];
//                org.Name = (string) reader["Name"];
//                org.ShortName = (string) reader["ShortName"];

//                if (reader.Read())
//                {
//                    //too many results returned
//                    org = null;
//                }
//            }
//            return org;
//        }
//    }
//}